package jp.sinya;

import javax.servlet.*;
import java.io.IOException;

public class DemoServlet2 implements Servlet {
    private ServletConfig config;

    @Override
    public void init(ServletConfig servletConfig) throws ServletException {
        this.config = servletConfig;
    }

    @Override
    public ServletConfig getServletConfig() {

        return this.config;
    }

    @Override
    public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {
        System.out.println("每次处理请求都会走这里.....");
    }

    @Override
    public String getServletInfo() {
        //很少去使用到的方法
        return null;
    }

    @Override
    public void destroy() {

    }
}
